from django.forms import ModelForm
from django import forms
from django.db.models.query import QuerySet


from projects.models import Aim, Deliverable, Objective, Project, Task, WorkPackage

class AimForm(ModelForm):
    ''' Generic form for editing aims. '''
    class Meta:
        model = Aim

class TaskForm(ModelForm):
    class Meta:
        model = Task

class DeliverableForm(ModelForm):
    class Meta:
        model = Deliverable

class ObjectiveForm(ModelForm):
    class Meta:
        model = Objective
        exclude = ('task',)

class ProjectForm(ModelForm):
    ''' Generic form for editing projects. '''
    class Meta:
        model = Project

class WorkPackageForm(ModelForm):
    ''' Generic form for editing work packages. '''
    class Meta:
        model = WorkPackage

